\documentclass[12pt,a4paper]{article}
\usepackage[UTF8]{ctex}
\usepackage{geometry}
\usepackage{amsmath,amssymb,amsthm}
\usepackage{mathtools,bm}
\usepackage{empheq}
\usepackage{graphicx}
\usepackage{booktabs}
\usepackage[numbers,sort&compress]{natbib}
\usepackage{caption}
\usepackage{enumitem}
\usepackage{chngcntr}

% ========== 页面布局 ==========
\geometry{left=2.5cm,right=2.5cm,top=2.5cm,bottom=2.5cm}
\setlength{\parskip}{0.5em}
\renewcommand{\baselinestretch}{1.2}

% ========== 数学命令 ==========
\newcommand{\diff}{\mathop{}\!\mathrm{d}}
\newcommand{\R}{\mathbb{R}}
\newcommand{\C}{\mathbb{C}}
\newcommand{\Z}{\mathbb{Z}}
\newcommand{\N}{\mathbb{N}}
\DeclareMathOperator{\supp}{supp}

% ========== 编号系统 ==========
\numberwithin{subsection}{section}   % 子小节按章节编号
\numberwithin{subsubsection}{subsection}
\counterwithin{equation}{subsection} % 公式按子小节编号

% ========== 定理环境 ==========
\theoremstyle{plain}
\newtheorem{theorem}{定理}[section]
\newtheorem{lemma}[theorem]{引理}
\newtheorem{proposition}[theorem]{命题}
\newtheorem{corollary}[theorem]{推论}
\newtheorem{solution}{解}[subsection]  % 解按子小节编号

\theoremstyle{definition}
\newtheorem{definition}[theorem]{定义}
\newtheorem{example}{示例}[subsection]  % 示例按子小节编号

\theoremstyle{remark}
\newtheorem{remark}[theorem]{注记}

\theoremstyle{remark}
\newtheorem{verification}[theorem]{验证}

% 加载hyperref包以实现超链接功能
\usepackage[colorlinks=true, linkcolor=black]{hyperref}

\title{傅里叶级数三角形式和复指数形式及系数推导}
\author{陈柏均}
\date{2025年3月3日}

\begin{document}
	\maketitle
	
	\tableofcontents  % 添加目录
	
	\newpage

\section{三角形式}
函数 \( f(t) \) 的傅里叶级数展开的三角形式:
\begin{equation}
	f = \frac{a_0}{2} + \sum_{n=1}^{\infty} \left( a_n \cos nt + b_n \sin nt \right)
\end{equation}

基底为$(1, \cos x, \sin x, \cos 2x, \sin 2x, \ldots, \cos nx, \sin nx, \ldots)$，

坐标为$(a_0, a_1, b_1, a_2,  b_2, \ldots, a_n, b_n, \ldots)$



\subsection{正交性}


基底正交性证明：区间只需保证在一个周期内就行。对于 \(\cos nx\) 和 \(\sin nx\) 的周期：


$\cos nx$在对称区间积分为0，而且周期内为0
\begin{equation}
\int_{-\pi}^{\pi} 1 \cdot \cos nx \, dx = 0 \quad (n \geq 1)
\end{equation}

因为为$\sin nx$为奇函数奇函数，
\begin{equation}
\int_{-\pi}^{\pi} 1 \cdot \sin nx \, dx = 0 \quad (n \geq 1)
\end{equation}


\begin{proof}$\int_{-\pi}^{\pi} \cos nx \cdot \cos mx \, dx ， \quad (n \neq m)$
已知：
\begin{equation}
	\left\{
	\begin{aligned}
		\cos(A + B) &= \cos A \cos B - \sin A \sin B \\[8pt]
		\cos(A - B) &= \cos A \cos B + \sin A \sin B
	\end{aligned}
	\right.
\end{equation}

相加得：
\begin{equation}
	\cos A \cos B = \frac{\cos(A + B) + \cos(A - B)}{2}
\end{equation}

代入并积分：
\begin{equation}
	\int_{-\pi}^{\pi} \cos nx \cdot \cos mx \, dx = \frac{1}{2} \int_{-\pi}^{\pi} \left[ \cos(n + m)x + \cos(n - m)x \right] dx = 0 
\end{equation}
\end{proof}


\begin{proof}\(\int_{-\pi}^{\pi} \sin nx \cdot \sin mx \, dx  \quad (n \neq m)\)

已知：
\begin{equation}
	\left\{
	\begin{aligned}
		\sin(A + B) &= \sin A \cos B + \cos A \sin B  \\[8pt]
		\sin(A - B) &= \sin A \cos B - \cos A \sin B
	\end{aligned}
	\right.
\end{equation}

相减得：
\begin{equation}
	\sin A \sin B = \frac{\cos(A - B) - \cos(A + B)}{2}
\end{equation}

代入并积分：
\begin{equation}
	\int_{-\pi}^{\pi} \sin nx \cdot \sin mx \, dx = \frac{1}{2} \int_{-\pi}^{\pi} \left[ \cos(n - m)x - \cos(n + m)x \right] dx = 0 
\end{equation}
\end{proof}


\begin{proof} \(\int_{-\pi}^{\pi} \sin nx \cdot \cos mx \, dx  \quad (n = m )\)

已知：
\begin{equation}
	\left\{
	\begin{aligned}
		\sin(A + B) &= \sin A \cos B + \cos A \sin B  \\[8pt]
		\sin(A - B) &= \sin A \cos B - \cos A \sin B
	\end{aligned}
	\right.
\end{equation}

相减得：
\begin{equation}
	\sin A \cos B = \frac{\sin(A + B) + \sin(A - B)}{2}
\end{equation}

代入并积分：
\begin{equation}
	\int_{-\pi}^{\pi} \sin nx \cdot \cos mx \, dx = \frac{1}{2} \int_{-\pi}^{\pi} \left[ \sin(n + m)x + \sin(n - m)x \right] dx = 0 \quad (\sin kx 积分同上)
\end{equation}

综上所述，正交性得证。
\end{proof}

\subsection{范数计算}
\begin{equation}
	\int_{-\pi}^{\pi} 1 \cdot 1 \, dx = 2\pi
\end{equation}

\begin{equation}
	\begin{aligned}
		\int_{-\pi}^{\pi} \cos nx \cdot \cos nx \, dx &= \frac{1}{2} \cdot \int_{-\pi}^{\pi} \left( \cos 2nx + \cos(0x) \right) dx \\[8pt]
		&= \frac{1}{2} \cdot \int_{-\pi}^{\pi} 1 \, dx = \pi
	\end{aligned}
\end{equation}

\begin{equation}
		\int_{-\pi}^{\pi} \sin nx \cdot \sin nx \, dx = \frac{1}{2} \cdot \int_{-\pi}^{\pi} \left( \cos(0x) - \cos(2nx) \right) dx \\[8pt]
		= \pi
\end{equation}

\subsection{系数的导出}

	\subsubsection{$L^2$空间内积与最佳逼近}
当存在最佳逼近（$L^2$空间为希尔伯特空间必存在），$f \in L^2$,则系数有
\begin{equation}
	\begin{aligned}
		a_n &= \frac{\langle f(x), \cos nx \rangle}{\langle \cos nx, \cos nx \rangle} = \frac{\int_{-\pi}^{\pi} f(x) \cdot \cos nx \, dx}{\int_{-\pi}^{\pi} \cos nx \cdot \cos nx \, dx} \\[8pt]
		&= \frac{1}{\pi} \int_{-\pi}^{\pi} f(x) \cdot \cos nx \, dx
	\end{aligned}
\end{equation}


\begin{equation}
	\begin{aligned}
		b_n &= \frac{\langle f(x), \sin nx \rangle}{\langle \sin nx, \sin nx \rangle} = \frac{\int_{-\pi}^{\pi} f(x) \cdot \sin nx \, dx}{\int_{-\pi}^{\pi} \sin nx \cdot \sin nx \, dx} \\[8pt]
		&= \frac{1}{\pi} \int_{-\pi}^{\pi} f(x) \cdot \sin nx \, dx
	\end{aligned}
\end{equation}

\begin{equation}
 \frac{a_0}{2} = \frac{\langle f(x), 1 \rangle}{\langle 1, 1 \rangle} = \frac{\int_{-\pi}^{\pi} f(x) \, dx}{\int_{-\pi}^{\pi} 1  \, dx} \\[8pt]
= \frac{1}{2\pi} \int_{-\pi}^{\pi} f(x)  \, dx
\end{equation}


\begin{remark}
把他看作是有限维向量空间，内积就是向量点乘，系数就是到基的投影，这样类比理解。
\end{remark}


	\subsubsection{用数分知识求系数，条件和前面泛函内积不一样}

考虑函数 \( f(t) \) 的傅里叶级数展开:
\begin{equation}
	f = \frac{a_0}{2} + \sum_{n=1}^{\infty} \left( a_n \cos nt + b_n \sin nt \right)
\end{equation}

计算 \( a_0 \):
\begin{equation}
	\frac{a_0}{2} = f - \sum_{n=1}^{\infty} \left( a_n \cos nt + b_n \sin nt \right)
\end{equation}

\begin{equation}
	a_0 = 2f - 2 \sum_{n=1}^{\infty} \left( a_n \cos nt + b_n \sin nt \right)
\end{equation}

对 \( a_0 \) 积分,若积分和求和可换序：
\begin{equation}
	\frac{1}{2\pi} \int_{-\pi}^{\pi} a_0 \, dt = \frac{1}{\pi} \int_{-\pi}^{\pi} f \, dt - \sum_{n=1}^{\infty} \frac{1}{\pi} a_n \int_{-\pi}^{\pi} \cos nt \, dt - \sum_{n=1}^{\infty} \frac{1}{\pi} b_n \int_{-\pi}^{\pi} \sin nt \, dt
\end{equation}

化简得:
\begin{equation}
	a_0 = \frac{1}{\pi} \int_{-\pi}^{\pi} f \, dt
\end{equation}

计算 \( a_n \):
\begin{equation}
	f \cos nt = \frac{a_0}{2} \cos nt + \sum_{k=1}^{\infty} \left( a_k \cos kt + b_k \sin kt \right) \cos nt
\end{equation}

积分得，若积分和求和可换序：
\begin{equation}
	\int_{-\pi}^{\pi} f \cos nt \, dt = \int_{-\pi}^{\pi} \frac{a_0}{2} \cos nt \, dt + \sum_{k=1}^{\infty} \left( a_k \int_{-\pi}^{\pi} \cos kt \cos nt \, dt + b_k \int_{-\pi}^{\pi} \sin kt \cos nt \, dt \right)
\end{equation}

化简得:
\begin{equation}
	\int_{-\pi}^{\pi} f \cos nt \, dt = a_n \pi
\end{equation}

因此:
\begin{equation}
	a_n = \frac{1}{\pi} \int_{-\pi}^{\pi} f \cos nt \, dt
\end{equation}

同理可得:
\begin{equation}
	b_n = \frac{1}{\pi} \int_{-\pi}^{\pi} f \sin nt \, dt
\end{equation}

问题是什么时候才能让求和与积分互换，收敛性条件之后会详细讨论
\begin{equation}
	\sum_{n=1}^{\infty} a_n \cos nx < \infty \qquad \sum_{n=1}^{\infty} b_n \sin nx < \infty
\end{equation}



\subsection{三角形式到复数形式的推导}
由：
\begin{equation}
	\left\{
	\begin{aligned}
		e^{ikx} &= \cos kx + i \cdot \sin kx \\[8pt]
		e^{-ikx} &= \cos kx - i \cdot \sin kx
	\end{aligned}
	\right.
\end{equation}

可得：
\begin{equation}
\left\{
\begin{aligned}
	\cos kx &= \frac{1}{2} \cdot (e^{ikx} + e^{-ikx}) \\[8pt]
	\sin kx &= \frac{1}{2i} \cdot (e^{ikx} - e^{-ikx})
\end{aligned}
\right.
\end{equation}

所以，
\begin{equation}
	\begin{aligned}
		f(x) &= \frac{a_0}{2} + \sum_{n=1}^{\infty} (a_n \cdot \cos nx + b_n \cdot \sin nx) \\[8pt]
		&= \frac{a_0}{2} + \sum_{n=1}^{\infty} \left[ \frac{1}{2} a_n \cdot (e^{inx} + e^{-inx}) + \frac{1}{2i} b_n \cdot (e^{inx} - e^{-inx}) \right] \\[8pt]
		&= \frac{a_0}{2} + \sum_{n=1}^{\infty} \left[ e^{inx} \cdot \left( \frac{a_n}{2} + \frac{b_n}{2i} \right) + e^{-inx} \cdot \left( \frac{a_n}{2} - \frac{b_n}{2i} \right) \right]
	\end{aligned}
\end{equation}
 
 得系数如下：
 \begin{equation}
 	C_0 = \frac{a_0}{2} = \frac{1}{2\pi} \int_{-\pi}^{\pi} f(x) \, dx = \frac{1}{2\pi} \int_{-\pi}^{\pi} f(x) \cdot e^{i0x} \, dx
 \end{equation}
 
\begin{equation}
		\begin{aligned}
		C_n &= \frac{a_n}{2} + \frac{b_n}{2i} \\
		&= \frac{1}{\pi} \int_{-\pi}^{\pi} f(x) \cdot \cos nx \, dx - \frac{1}{\pi} \int_{-\pi}^{\pi} f(x) \cdot \sin nx \, dx \cdot i \\[8pt]
		&= \frac{1}{2\pi} \int_{-\pi}^{\pi} f(x) \cdot e^{-inx} \, dx
	\end{aligned}
\end{equation}

\begin{equation}
		\begin{aligned}
		C_{-n} &= \frac{a_n}{2} - \frac{b_n}{2i} \\
		&= \frac{1}{\pi} \int_{-\pi}^{\pi} f(x) \cdot \cos nx \, dx + \frac{1}{\pi} \int_{-\pi}^{\pi} f(x) \cdot \sin nx \, dx \cdot i \\[8pt]
		&= \frac{1}{2\pi} \int_{-\pi}^{\pi} f(x) \cdot e^{inx} \, dx
	\end{aligned}
\end{equation}

最终得复数形式
	\begin{equation}
		f(x) = \sum_{n=-\infty}^{+\infty} C_n \cdot e^{inx}
	\end{equation}

其中，
\begin{equation}
		C_n =  \frac{1}{2\pi} \int_{-\pi}^{\pi} f(x) \cdot e^{-inx} \, dx
\end{equation}



\section{复数形式}
上面是从三角形式推到复数形式，下面是不知道系数，只知道形式，重复三角形式的步骤。
	\begin{equation}
	f(x) = \sum_{n=-\infty}^{+\infty} C_n \cdot e^{inx}
\end{equation}


\subsection{正交性和范数}
\begin{proof}
\begin{equation}
	\left\{
	\begin{aligned}
		\langle e^{inx} \cdot e^{imx} \rangle &= \int_{-\pi}^{\pi} e^{i(n-m)x} dx = 0, & n \neq m \\[8pt]
		\langle e^{inx} \cdot e^{imx} \rangle &= \int_{-\pi}^{\pi} 1 dx = 2\pi, & n = m
	\end{aligned}
	\right.
\end{equation}
\end{proof}

\subsection{系数的推导}

\subsubsection{内积与最佳逼近}
道理同上，可得：
\begin{equation}
 C_n = \frac{\langle f(x), e^{inx} \rangle}{\langle e^{inx}, e^{inx} \rangle} = \frac{\int_{-\pi}^{\pi} f(x) \cdot e^{-inx} dx}{\int_{-\pi}^{\pi} 1 dx} = \frac{1}{2\pi} \int_{-\pi}^{\pi} f(x) \cdot e^{-inx} dx
\end{equation}

\subsubsection{数分之间接法}
若积分与求和可互换，则有，
\begin{equation}
	\int_{-\pi}^{\pi} f(x) \cdot e^{-imx} dx = \int_{-\pi}^{\pi} \sum_{n=-\infty}^{+\infty} C_n \cdot e^{i(n-m)x} dx = \sum_{n=-\infty}^{+\infty} C_n \int_{-\pi}^{\pi} e^{i(n-m)x} dx
\end{equation}

因为正交性只剩下$n=m$的一项
\begin{equation}
	 \int_{-\pi}^{\pi} f(x) \cdot e^{-imx} dx = C_m \cdot 2\pi \quad  
\end{equation}

故得
\begin{equation}
C_n = \frac{1}{2\pi} \cdot \int_{-\pi}^{\pi} f(x) \cdot e^{-inx} dx
\end{equation}

\subsubsection{数分之直接法}
由原式子可得：
\begin{equation}
C_n =e^{-inx} \cdot f(x)-\sum_{k \neq n} C_k \cdot e^{i(k-n)x}
\end{equation}

若积分与求和可互换，则有，
\begin{equation}
	\begin{aligned}
		C_n &= \frac{1}{2\pi} \int_{-\pi}^{\pi} C_n dx \\
		&= \frac{1}{2\pi} \left[ \int_{-\pi}^{\pi} e^{-inx} \cdot f(x) dx - \int_{-\pi}^{\pi} \sum_{k \neq n} C_k \cdot e^{i(k-n)x} dx \right] \\[8pt]
		&= \frac{1}{2\pi} \left[ \int_{-\pi}^{\pi} f(x) \cdot e^{-inx} dx - \sum_{k \neq n} C_k \cdot \int_{-\pi}^{\pi} e^{i(k-n)x} dx \right] \\[8pt]
		&= \frac{1}{2\pi} \cdot \int_{-\pi}^{\pi} f(x) \cdot e^{-inx} dx
	\end{aligned}
\end{equation}

\end{document}

